<fieldset>
    <legend>PHPCrawler Response</legend>
    <table class="table table-striped table-bordered">
        <?php
        if (is_object($result)) {
            if (property_exists($result, 'err') && !$result->err)
                echo <<<EOT
                    <tr>
                        <th>Mã lỗi </th>
                        <td>$result->err</td>
                    </tr>
                    <tr>
                        <th>Thông điệp</th>
                        <td>$result->msg</td>
                    </tr>
EOT;
            if (property_exists($result, 'cnt') && $result->cnt)
                echo <<<EOT
                <tr>
                    <th>Nội dung kết quả</th>
                    <td>$result->cnt</td>
                </tr>
EOT;
            if (property_exists($result, 'prtt') && $result->prtt) {
                $prtt = $result->prtt;
                echo <<<EOT
                <tr>
                    <th>Prototype</th>
                    <td>{"prototype":"$prtt","type":"$type"}</td>
                </tr>
EOT;
                
            }
        }
        ?>
    </table>
</fieldset>
